#!/bin/sh

if [ "$1" = "-h" ]; then
	cat <<EOF>&2
Usage: ${0##*/}

Print number of open files per process.

EOF
	exit
fi

lsof | awk '{x[$1]++} END {for(i in x) print i, x[i]}' | sort
